xen: introduce prepare_staticmem_pages
authorPenny Zheng <Penny.Zheng@arm.com>
Tue, 6 Sep 2022 07:39:17 +0000 (15:39 +0800)
committerJulien Grall <jgrall@amazon.com>
Tue, 6 Sep 2022 16:53:35 +0000 (17:53 +0100)
commit508d2d297f7a99ed3c839a21d786f7e2a1284510
tree0a397a9814eefdec42cacb71f59b4124def9cbf0
parentb01721f0779d56a60b9db26a09b79b469f260d8a
xen: introduce prepare_staticmem_pages

Later, we want to use acquire_domstatic_pages() for populating memory
for static domain on runtime, however, there are a lot of pointless work
(checking mfn_valid(), scrubbing the free part, cleaning the cache...)
considering we know the page is valid and belong to the guest.

This commit splits acquire_staticmem_pages() in two parts, and
introduces prepare_staticmem_pages to bypass all "pointless work".

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Julien Grall <jgrall@amazon.com>
xen/common/page_alloc.c